<?php $this->load->view('admin/admin_header');?>
		<!-- BEGIN CONTENT -->
		<div class="page-content-wrapper">
			<div class="page-content">
				<!-- BEGIN SAMPLE PORTLET CONFIGURATION MODAL FORM-->
				<div class="modal fade" id="portlet-config" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
					<div class="modal-dialog">
						<div class="modal-content">
							<div class="modal-header">
								<button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>
								<h4 class="modal-title">Modal title</h4>
							</div>
							<div class="modal-body">
								 Widget settings form goes here
							</div>
							<div class="modal-footer">
								<button type="button" class="btn blue">Save changes</button>
								<button type="button" class="btn default" data-dismiss="modal">Close</button>
							</div>
						</div>
						<!-- /.modal-content -->
					</div>
					<!-- /.modal-dialog -->
				</div>
				<!-- /.modal -->
				<!-- END SAMPLE PORTLET CONFIGURATION MODAL FORM-->
				<!-- BEGIN STYLE CUSTOMIZER -->
				<div class="theme-panel">
					<div class="theme-options">
						<div class="theme-option theme-colors clearfix">
							<span>
							THEME COLOR </span>
							<ul>
								<li class="color-default current tooltips" data-style="default" data-container="body" data-original-title="Default">
								</li>
								<li class="color-grey tooltips" data-style="grey" data-container="body" data-original-title="Grey">
								</li>
								<li class="color-blue tooltips" data-style="blue" data-container="body" data-original-title="Blue">
								</li>
								<li class="color-dark tooltips" data-style="dark" data-container="body" data-original-title="Dark">
								</li>
								<li class="color-light tooltips" data-style="light" data-container="body" data-original-title="Light">
								</li>
							</ul>
						</div>
						<div class="theme-option">
							<span>
							Theme Style </span>
							<select class="layout-style-option form-control input-small">
								<option value="square" selected="selected">Square corners</option>
								<option value="rounded">Rounded corners</option>
							</select>
						</div>
						<div class="theme-option">
							<span>
							Layout </span>
							<select class="layout-option form-control input-small">
								<option value="fluid" selected="selected">Fluid</option>
								<option value="boxed">Boxed</option>
							</select>
						</div>
						<div class="theme-option">
							<span>
							Header </span>
							<select class="page-header-option form-control input-small">
								<option value="fixed" selected="selected">Fixed</option>
								<option value="default">Default</option>
							</select>
						</div>
						<div class="theme-option">
							<span>
							Top Dropdown</span>
							<select class="page-header-top-dropdown-style-option form-control input-small">
								<option value="light" selected="selected">Light</option>
								<option value="dark">Dark</option>
							</select>
						</div>
						<div class="theme-option">
							<span>
							Sidebar Mode</span>
							<select class="sidebar-option form-control input-small">
								<option value="fixed">Fixed</option>
								<option value="default" selected="selected">Default</option>
							</select>
						</div>
						<div class="theme-option">
							<span>
							Sidebar Style</span>
							<select class="sidebar-style-option form-control input-small">
								<option value="default" selected="selected">Default</option>
								<option value="compact">Compact</option>
							</select>
						</div>
						<div class="theme-option">
							<span>
							Sidebar Menu </span>
							<select class="sidebar-menu-option form-control input-small">
								<option value="accordion" selected="selected">Accordion</option>
								<option value="hover">Hover</option>
							</select>
						</div>
						<div class="theme-option">
							<span>
							Sidebar Position </span>
							<select class="sidebar-pos-option form-control input-small">
								<option value="left" selected="selected">Left</option>
								<option value="right">Right</option>
							</select>
						</div>
						<div class="theme-option">
							<span>
							Footer </span>
							<select class="page-footer-option form-control input-small">
								<option value="fixed">Fixed</option>
								<option value="default" selected="selected">Default</option>
							</select>
						</div>
					</div>
				</div>
				<!-- END STYLE CUSTOMIZER -->
				<!-- BEGIN PAGE HEADER-->
								<!-- END PAGE HEADER-->
									<div class="portlet box blue">
										<div class="portlet-title">
											<div class="caption">
												<i class="fa fa-gift"></i>Edit Module
											</div>
											<div class="tools">
												<a href="javascript:;" class="collapse">
												</a>
												<a href="#portlet-config" data-toggle="modal" class="config">
												</a>
												<a href="javascript:;" class="reload">
												</a>
												<a href="javascript:;" class="remove">
												</a>
											</div>
										</div>
										</div>
					<!--<form action="#" class="horizontal-form">-->
					<?php echo form_open('admin/module_ctrl/edit_module', array('class'=>'horizontal-form'));?>
												<div class="form-body">
													<div class="row">
														<div class="col-md-6">
															<div class="form-group">
																<label class="control-label">Module Name</label>
																<input type="text" value="<?php echo $name;?>"  name="name" id="firstName" class="form-control" placeholder="Chee Kin">
																<span class="help-block">
																<?php echo form_error('name'); ?> </span>
															</div>
														</div>
														<input type="hidden" value="<?php echo $module_id;?>"  name="hidden" id="lastName" class="form-control" placeholder="Lim">

														<!--/span-->
														<div class="col-md-6">
															<div class="form-group">
																<label class="control-label">Sequence</label>
																<input type="text" value="<?php echo $sequence;?>"  name="sequence" id="lastName" class="form-control" placeholder="Lim">
																<span class="help-block">
																<?php echo form_error('sequence'); ?> </span>
															</div>
														</div>
														</div>
														<!--/span-->
													</div>
													
														
														
														
												<div class="portlet-body">
								<div class="table-toolbar">
									<div class="row">
										<div class="col-md-6">
											<div class="btn-group">
												<a class="btn green" href="<?php echo base_url().'index.php/admin/module_ctrl/create_submodule/'.$module_id;?>">Add New Submodule <i class="fa fa-plus"></i></a>
											</div>
										</div>
									
									</div>
								</div>
								<table class="table table-striped table-hover table-bordered" id="sample_editable_1">
								<thead>
								<tr>
									<th>
										 Name
									</th>
									<th>
										 File Name
									</th>
									<th>
										 Date
									</th>
									<th>
										 Edit
									</th>
									<th>
										 Delete
									</th>
								</tr>
								</thead>
								<tbody>
								<?php //echo 'Total Records: '.$usermanagement_all_submodules->total;?>
								<?php //echo '<pre>';print_r($usermanagement_all_submodules);exit;?>
								<?php foreach($usermanagement_all_submodules->info as $value):?>
								<tr>
									<td>
										 <?php echo $value->module_name?>
									</td>
									<td>
										 <?php echo $value->file_name?>
									</td>
									<td>
										 <?php echo $value->created_date?>
									</td>
									<td>
										<a class="edit" href="<?php echo base_url().'index.php/admin/module_ctrl/edit_submodule/'.$value->module_id;?>">
										Edit </a>
									</td>
									<td>
										<a class="delete" href="<?php echo base_url().'index.php/admin/module_ctrl/delete_submodule/'.$value->module_id.'/'.$value->status.'/'.$module_id;?>">
										<?php if($value->status == 1){?>
										 Delete
										 <?php }else{ ?>
										 Active
										  <?php } ?></a>
									</td>
								</tr>
								<?php endforeach;?>
								
							</table>
						<!-- END EXAMPLE TABLE PORTLET-->
					</div>
						<div class="form-actions right">
													<a href="<?php echo base_url().'index.php/admin/module_ctrl'?>" class="btn default">Cancel</a>
													<button type="submit" class="btn blue"><i class="fa fa-check"></i> Save</button>
												</div>
												</div>
												<?php echo form_close();?>
											<!--</form>-->
											<!-- END FORM-->
											
			
<?php $this->load->view('admin/admin_footer');?>
